/**
 * 由 WangYu 创建
 * 日期 2017/9/28
 */
import React, {Component} from 'react';
import {
    StyleSheet,
    Text,
    View,
    Image,
    TouchableOpacity, TouchableHighlight,
} from 'react-native';
import {themeColor} from "../util/Config";
import Toast from "teaset/components/Toast/Toast";
import {Actions} from "react-native-router-flux";
export default class Button extends Component {

    constructor(props) {
        super(props);
    }

    render() {
        return (
            <TouchableHighlight style={[styles.container,this.props.style]} activeOpacity={0.4}
                                underlayColor={'#edc135'}
                                onPress={this.props.onPress}>
            <View style={styles.container}>
                <Text style={{color:'black'}}>{this.props.title}</Text>
            </View>
            </TouchableHighlight>
        );
    }
}

const styles = StyleSheet.create({
    container: {
        height:40,
        backgroundColor:themeColor,
        justifyContent:'center',
        alignItems:'center',
        alignSelf:'stretch',
        borderRadius:5,
    },
});
